package com.codeduck.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 题目表
 * </p>
 *
 * @author ddh
 * @since 2025-07-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("code_duck_question")
@ApiModel(value = "CodeDuckQuestion对象", description = "题目表")
public class CodeDuckQuestion implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "题目ID，主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "题目标题")
    private String title;

    @ApiModelProperty(value = "题目内容或描述")
    private String content;

    @ApiModelProperty(value = "题目答案")
    private String answer;

    @ApiModelProperty(value = "题目难度，简单、中等、困难")
    private Integer difficulty;

    @ApiModelProperty(value = "题目分类ID，关联 code_duck_question_category 表")
    private String questionCategoryId;

    @ApiModelProperty(value = "排序字段（数值越小排序越靠前）")
    private String sort;

    @ApiModelProperty(value = "创建者ID，关联 code_duck_user 表")
    @TableField(fill = FieldFill.INSERT)
    private String createdBy;

    @ApiModelProperty(value = "最后修改人ID, 关联 code_duck_user 表")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updatedBy;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "最后更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @ApiModelProperty(value = "题目状态，如 ACTIVE（活跃）、INACTIVE（停用）")
    @TableField(fill = FieldFill.INSERT)
    private String status;

    @ApiModelProperty(value = "是否为会员专属，0为否，1为是")
    private Integer isVip;


}
